package com.hzncc.flowable_diboot.custom_field.entity;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import java.lang.Double;
import java.math.BigDecimal;

import jakarta.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import com.diboot.core.util.D;
import com.diboot.core.entity.BaseModel;
import com.diboot.core.entity.BaseEntity;
import com.diboot.core.binding.query.BindQuery;
import com.diboot.core.binding.query.Comparison;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;

import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * 自定义表格配置 Entity 定义
 *
 * @author MyName
 * @version 1.0
 * @date 2024-11-14
 * Copyright © MyCorp
 */
@TableName("mdl_custom_table_config")
@Getter
@Setter
@Accessors(chain = true)
public class CustomTableConfig extends BaseModel {
    private static final long serialVersionUID = 1302484041150300048L;
    /**
     * 租户
     */
    @NotNull(message = "租户不能为空")
    @TableField()
    private String tenantId;

    /**
     * 编码
     */
    @NotNull(message = "编码不能为空")
    @Length(max = 50, message = "编码长度应小于50")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String code;

    /**
     * 名称
     */
    @Length(max = 50, message = "名称长度应小于50")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String name;

    /**
     * 表格标题
     */
    @Length(max = 50, message = "表格标题长度应小于50")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String title;

    /**
     * sql语句
     */
    @TableField(value = "`sql`")
    private String sql;

    /**
     * 实体
     */
    @Length(max = 200, message = "实体长度应小于200")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String entity;

    /**
     * 查询接口
     */
    @Length(max = 200, message = "查询接口长度应小于200")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String queryInterface;

    /**
     * 查询参数
     */
    @TableField()
    private String param;

    /**
     * 备注
     */
    @Length(max = 500, message = "备注长度应小于500")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String remark;

    /**
     * 视图实体
     */
    @Length(max = 100, message = "视图实体长度应小于200")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String viewEntity;

    /**
     * 导出接口
     */
    @Length(max = 500, message = "导出接口长度应小于200")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String exportInterface;

    /**
     * 是否显示合计行 0 否 1 是
     */
    @TableField()
    private Integer showSummary;
}